package com.gqz.defect.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gqz.common.core.domain.R;
import com.gqz.common.core.domain.RequestForm;
import com.gqz.defect.vo.AuditDefectsVo;
import com.gqz.defect.vo.EnDefectsTjVo;
import com.gqz.defect.vo.EnStockEquipDefectVo;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * 能源-盘点任务设备缺陷表
 */


//@RequestMapping("/en-stock-equip-defect")
@FeignClient(name = "bs-defects", contextId = "en-stock-equip-defect", path = "/en-stock-equip-defect")
public interface EnStockEquipDefectApi {
    /**
     * 能源-盘点任务设备缺陷表-getById能源-盘点任务设备缺陷表
     **/
    @PostMapping("/{id}")
    public R<List<EnStockEquipDefectVo>> getById(

            @PathVariable("id") String id);

    /**
     * 能源-盘点任务设备缺陷表-page能源-盘点任务设备缺陷表
     **/
    @PostMapping("/page")
    public R<Page<EnStockEquipDefectVo>> page(

            @RequestBody RequestForm<EnStockEquipDefectVo> requestForm);

    /**
     * 能源-盘点任务设备缺陷表-count能源-盘点任务设备缺陷表
     **/
    @PostMapping("/count")
    public R<Long> count(

            @RequestBody RequestForm<EnStockEquipDefectVo> requestForm);

    /**
     * 能源-盘点任务设备缺陷表-insert能源-盘点任务设备缺陷表
     **/
    @PostMapping("/insert")
    public R<Integer> insert(

            @RequestBody List<EnStockEquipDefectVo> forms);

    /**
     * 能源-盘点任务设备缺陷表-update能源-盘点任务设备缺陷表
     **/
    @PostMapping("/update")
    public R<Integer> update(

            @RequestBody List<EnStockEquipDefectVo> forms);

    /**
     * 能源-盘点任务设备缺陷表-delete能源-盘点任务设备缺陷表
     **/
    @PostMapping("/delete")
    public R<Boolean> delete(

            @RequestBody List<String> ids);

    /**
     * 能源-盘点任务设备缺陷表-exportExcel
     **/
    @PostMapping("/export/excel")
    public void exportExcel(
            @RequestParam("response")
            HttpServletResponse response,

            @RequestBody RequestForm<EnStockEquipDefectVo> requestForm);

    /**
     * 能源-盘点任务设备缺陷表审核
     **/
    @PostMapping("audit/")
    R<Boolean> auditDefects(

            @RequestBody AuditDefectsVo auditDefectsVo
    );

    /**
     * 能源-盘点任务设备缺陷表-page能源-盘点任务设备缺陷表
     **/
    @PostMapping("/pageByState")
    public R<Page<EnStockEquipDefectVo>> pageByState(

            @RequestBody RequestForm<EnStockEquipDefectVo> requestForm);

    /**
     * 获取缺陷隐患统计数量
     **/
    @RequestMapping(value = "/getDefectsStatusXx", method = RequestMethod.GET)
    public List<EnDefectsTjVo> getDefectsStatusXx(
            @RequestParam("sdate") String sdate,
            @RequestParam("edate") String edate);

}
